﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2011/12/27 0:07:17
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Restaurant.EntityType;
using Sector7.Framework.Core;

namespace Sector7.Restaurant.DAO
{
    /// <summary>
    /// 商品单位数据访问接口
    /// </summary>
    public interface IUnitDAO
    {
        /// <summary>
        /// 创建单位
        /// </summary>
        /// <param name="unit">单位信息</param>
        /// <returns></returns>
        int Create(RS_Unit unit);

        /// <summary>
        /// 读取所有单位
        /// </summary>
        /// <returns></returns>
        List<RS_Unit> ReadAll();

        /// <summary>
        /// 更新单位
        /// </summary>
        /// <param name="delta">单位改变信息</param>
        /// <returns></returns>
        int Update(EntityDelta delta);

        /// <summary>
        /// 删除单位
        /// </summary>
        /// <param name="unit">单位ID</param>
        /// <returns></returns>
        DBOptResultType Delete(int unitId);
    }
}
